package com.tomato.zip.config;

import com.tomato.zip.factory.ComparessService;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * 压缩包组件自动配置累
 */
@Configuration
@ComponentScan(basePackages = "com.tomato.zip")
public class ZipAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean(ComparessService.class)
    public ComparessService zipFactory() {
        return new ComparessService();
    }
}
